<?php

/**
 * Created by PhpStorm.
 * User: 张彪
 * Date: 2016/4/20 0020
 * Time: 下午 4:37
 */
class Array_model extends Base_Model
{
    public function __construct()
    {
        $this->load->database();
    }



    public function getArrays ()
    {

        $query = $this->db->get('mod_config_array');
        $ret = array();
        foreach ($query->result_array() as $rs)
        {

            if (! isset($ret[$rs['key']]))
                $ret[$rs['key']] = array();
            $ret[$rs['key']][$rs['id']] = $rs['string'];
        }
        return $ret;
    }
}